<?php 
  require_once("konf.php"); 

?>
<!doctype html>
<html>
  <head>
     <title>Autoparanduse info</title>
  </head>
  <body>
    <h1>Valmis autod</h1>
<?php	
$kask=$yhendus->prepare("SELECT id, kliendinimi, automark, numbrim2rk, veatyyp, kontakt, bronaeg, seisund FROM autoparandus WHERE seisund='Valmis'");
  $kask->bind_result($id, $kliendinimi, $automark, $numbrim2rk, $veatyyp, $kontakt, $bronaeg, $seisund);
  $kask->execute();
  echo "<table><tr>
			<th style='width: 100px;'>Kliendi nimi</th>
			<th style='width: 100px;'>Auto mark</th>
			<th style='width: 100px;'>Auto numbrimärk</th>
			<th style='width: 100px;'>Vea tüüp</th>
			<th style='width: 100px;'>Kontakt</th>
			<th style='width: 100px;'>Broneeritud aeg</th>
			<th style='width: 100px;'>Seisund</th></tr>";
  while($kask->fetch()){
  echo "<tr>";
			
  echo "
			  <td>$kliendinimi</td>
			  <td>$automark</td>
			  <td>$numbrim2rk</td>
			  <td>$veatyyp</td>
			  <td>$kontakt</td>
			  <td>$bronaeg</td>
			  <td>$seisund</td>
			  
			
			
  ";
  
  }
  echo "</tr></table>"
?>  

	
  </body>
</html>
<?php
$yhendus->close();
?>